#cmake -D CMAKE_PREFIX_PATH=/usr/lib64/atlas ../src
cmake_minimum_required (VERSION 2.6) 
project (ML) 

message("ML_SOURCE_DIR = " ${ML_SOURCE_DIR})

find_package(MPI REQUIRED)
find_package(LAPACK)
message("LAPACK_LIBRARIES = " ${LAPACK_LIBRARIES})

set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
set(BOOST_LIBRARIES boost_mpi boost_program_options boost_iostreams boost_filesystem)

include_directories(
  ~/local/include
  ${CMAKE_SOURCE_DIR}/../../externs/armadillo-3.820.1/include
  ${ML_SOURCE_DIR}
  #${MPI_CXX_INCLUDE_PATH}
)

link_directories(
  ~/local/lib
)

add_definitions(-O3 -Wreturn-type -Wuninitialized -std=c++0x)

subdirs(
  factorization
  traceroute
  classification
)

add_executable(factor 
  factor.cpp
  factor_jobs.h
  factor_jobs.cpp
)
target_link_libraries(factor
  ${BOOST_LIBRARIES}
  ${LAPACK_LIBRARIES}
  factorization
)
